package com.sheep.jucdemo.part2.part2_12;

/**
 * @Date 2022/4/14 23:38
 * @Created by sheep
 */
public class Test2_12_4 {

    public synchronized void helloA(){
        System.out.println("hello");
    }

    public synchronized void helloB(){
        System.out.println("hello B");
        helloA();
    }

    public static void main(String[] args) {
        Test2_12_4 test2_12_4 = new Test2_12_4();
        test2_12_4.helloA();
        test2_12_4.helloB();
    }

}
